import request from '@/utils/request'

// 获取权限信息
export function getPermissionListApi() {
  return request({
    method: 'GET',
    url: '/sys/permission'
  })
}

// 添加权限接口
export function addPermissionApi(data) {
  return request({
    method: 'POST',
    url: '/sys/permission',
    data
  })
}

// 删除
export function delPermissionApi(id) {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}
// 更新
export function updatePermissionApi(data) {
  return request({
    method: 'PUT',
    data,
    url: `/sys/permission/${data.id}`
  })
}
// 详情
export function getPermissionDetail(id) {
  return request({
    method: 'GET',
    url: `/sys/permission/${id}`
  })
}
